﻿using DevExpress.XtraEditors;
using Lamex.Common;
using Lamex.Interface;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Lamex.Library
{
    public partial class frmBase : XtraForm, IFormBase
    {
        public DevExpress.LookAndFeel.DefaultLookAndFeel DefaultLookAndFeel;
        public frmBase()
        {
            InitializeComponent();
            if (Loginer.CurrentUser.ChangeLanguage == 0)
                System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("zh-Hans");
            else
                System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("en-Us");
            this.DefaultLookAndFeel = new DevExpress.LookAndFeel.DefaultLookAndFeel();
            LoadSkin();
        }
        public void LoadSkin()
        {
            if (SystemConfig.CurrentConfig != null) SetSkin(SystemConfig.CurrentConfig.SkinName);

        }
        public void SetSkin(string SkinName)
        {
            this.DefaultLookAndFeel.LookAndFeel.SkinName = SkinName;
        }
        public virtual void InitChangeLanguage()
        {
            
        }

        public void ChangeLanguage()
        {
            ChangeLanguage();
        }
    }
}
